﻿using System;
using System.Collections.Generic;

using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using BusinessLogic.ClassFactory;
using BusinessLogic.BusinessRules;
using DataAccess;
using IssueCommon;
using Common;

namespace RichECMS
{
    public partial class Index : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            using (WebSiteFactory objWebSiteFactory = new WebSiteFactory())
            {
                WebSite objWebSite = objWebSiteFactory.CreatorBySql(" intWebSiteLevel=1");
                if (objWebSite != null)
                {
                    Response.StatusCode = 301;
                    Response.Status = "301 Moved Permanently";
                    Response.RedirectLocation="news/"+objWebSite.DataItem.chvIssuePath+"/" + IssueBase.strDefaultFileName + AppConfig.GetWebFileType()+this.Request.Url.Query;
                }
                else
                {
                    Response.Write("没有设定转向页面");
                }
            }
        }
    }
}